package 
{
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.display.StageAlign;
	import flash.display.StageScaleMode;
	
	import starling.core.Starling;
	import net.hires.debug.Stats;
	import TetrisFlash.TetrisGame
	/**
	 * ...
	 * @author DANTRUONG
	 */
	[SWF(width="800", height="600", backgroundColor="#000000", frameRate="60")]
	public class TetrisAS3 extends Sprite 
	{
		private var myStarling:Starling;
		private var myStats:Stats;
		
		public function TetrisAS3():void 
		{
			stage.align = StageAlign.TOP_LEFT; 
			stage.scaleMode = StageScaleMode.NO_SCALE;
			addEventListener(Event.ADDED_TO_STAGE, onInit, false, 0, true);
		}
		
		private function onInit (event:Event):void {
			//set up debug stats
			myStats = new Stats();
			addChild(myStats);
			
			//set up starling
			myStarling = new Starling(TetrisGame, stage);
			myStarling.antiAliasing = 1;
			myStarling.start();			
		}
		
	}
	
}